<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="menu" content="mainMenu" />
<meta name="nav" content="2" />
<meta name="acc" content="0" />
<title>关键工序管理</title>
<script>
	$(document).ready(function() {
		 $("input[name='partDate']").addClass("Wate").bind("focus", function(){
	    	 WdatePicker({skin:'whyGreen',minDate:'1900-10-01',maxDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'});});
		//聚焦第一个输入框
		$("#name").focus();
		//为inputForm注册validate函数
		$("#inputForm").validate({
			rules:{
				depCode:{
					required:true,
					remote:"department!checkDepCode.action?oldDepCode=" + encodeURIComponent('${depCode}')
				},
				depName:"required",
				burderMan:"required",
				depType:"required",
				contactTelephone:"digits",
				portraiture:"digits",
				staffers:"digits"
			},
			messages:{
				depCode:{
					remote:"<font color='red'>机构代码已存在</font>"
				}
			}
		});
	});
	
</script>
</head>
<body>
	<form action="majorpart!save.action" method="post"  class="yform" id="inputForm" >
	<div id="caption" ><h6>关键工序信息</h6></div>
		<div>
		<table class="noborder">
			<tr class="type-text">
				<td>工序名称<font color="red">*</font></td>
				<td colspan="3"><input type="text" id="name" name="name"
					value="${name}" class="required"  size="20"/>
					<input type="hidden" name="id" value="${id}" />
					<c:if test="${fn:length(id)==0}">
					<input type="hidden" id="projectId" name="pid" value="${param.projectId}"/>
					<input type="hidden" id="subunitId" name="subunit" value="${param.subunitId}"/>
					</c:if>
					<c:if test="${fn:length(id)!=0}">
					<input type="hidden" id="projectId" name="pid" value="${pid}"/>
					<input type="hidden" id="subunitId" name="subunit" value="${subunit}"/>
					</c:if>
					</td>
				
			</tr>
			<tr>
				<td>所在位置<font color="red">*</font></td>
				<td colspan="3">
				<input type="text" id="location" name="location"
					value="${location}" class="required"  size="20"/>
				</td>
			</tr>
			<tr class="type-text">
				<td>是否质量职责要点<font color="red">*</font></td>
				<td>
					<s:select list="{'是','否'}" name="isduty" ></s:select>
				</td>
				<td>类型<font color="red">*</font></td>
				<td><input type="text" id="type" name="type"
					value="${type}" class="required" /></td>
			</tr>
			<tr class="type-text">
				<td>备注</td>
				<td colspan="3"><textarea id="remark" name="remark">${remark }</textarea></td>
			</tr>
			<tr>
				<td colspan="4">
					<div class="type-button">
						<input   type="submit" class="submit" value="提交" />&nbsp;
						<input   type="button" value="返回" class="reset"
							onclick="history.back()" />
					</div></td>
			</tr>
		</table>
		</div>
	</form>
</body>
</html>